package com.macro.mall.dto.applet;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author xq
 * @description AppletSignDTO
 * @date 2024/5/6 17:25
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class AppletSignDTO {

    @ApiModelProperty(value = "用户编号")
    private Long memberId;

    @ApiModelProperty(value = "打卡时长")
    @Min(value = 60, message = "打卡时长必须大于60分钟")
    @Max(value = 600, message = "打卡时长必须小于600分钟")
    @NotNull(message = "打卡时长不能为空！")
    private Integer timeInterval;

    @ApiModelProperty(value = "打卡日期 ")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date date;

}
